<%@ page language="java"
         contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"
         import="java.sql.*"
         import="com.shxt.lesson29.util.*"
         import="java.util.List"
         import="java.util.Map" %>
<%
    request.setCharacterEncoding("utf-8");
    String title = request.getParameter("title");

    DBManager dbm = new DBManager("test", "root", "");
    String sql = "select * from book where title LIKE '%" + title + "%'";
    List<Map<String, Object>> bookList = dbm.executeQuery(sql);
    
    String JSON = JSONParser.ListToJSON(bookList);
    response.getWriter().write(JSON);
%>

